Platform Explorer / Nuxeo Platform 5.8

Contribution org.nuxeo.ecm.poll.layouts--widgets

This contribution is part of XML component org.nuxeo.ecm.poll.layouts inside nuxeo-poll-web-5.8.jar

Extension Point

Extension point widgets of component WebLayoutManager.

Contributed Items

  • <widget name="poll_question" type="text">
          <labels>
            <label mode="any">label.poll.question</label>
          </labels>
          <translated>true</translated>
          <fields>
            <field>dc:title</field>
          </fields>
          <properties widgetMode="edit">
            <property name="styleClass">dataInputText</property>
            <property name="required">true</property>
          </properties>
        </widget>
  • <widget name="poll_answers" type="list">
          <labels>
            <label mode="any">label.poll.answers</label>
          </labels>
          <translated>true</translated>
          <fields>
            <field>poll:answers</field>
          </fields>
          <properties widgetMode="edit">
            <property name="required">true</property>
          </properties>
          <subWidgets>
            <widget name="listItem" type="text">
              <fields>
                <field/>
              </fields>
              <labels>
                <label mode="any"/>
              </labels>
              <properties widgetMode="edit">
                <property name="required">true</property>
              </properties>
            </widget>
          </subWidgets>
        </widget>
  • <widget name="start_date" type="datetime">
          <labels>
            <label mode="any">label.poll.startDate</label>
          </labels>
          <translated>true</translated>
          <fields>
            <field>poll:start_date</field>
          </fields>
          <properties widgetMode="any">
            <property name="pattern">#{nxu:basicDateFormater()}</property>
          </properties>
          <properties widgetMode="edit">
            <property name="format">#{nxu:basicDateFormater()}</property>
          </properties>
        </widget>
  • <widget name="end_date" type="datetime">
          <labels>
            <label mode="any">label.poll.endDate</label>
          </labels>
          <translated>true</translated>
          <fields>
            <field>dc:expired</field>
          </fields>
          <properties widgetMode="any">
            <property name="pattern">#{nxu:basicDateFormater()}</property>
          </properties>
          <properties widgetMode="edit">
            <property name="format">#{nxu:basicDateFormater()}</property>
          </properties>
        </widget>
  • <widget name="summary_open_poll" type="template">
          <labels>
            <label mode="any">label.summary.poll.status</label>
          </labels>
          <translated>true</translated>
          <properties widgetMode="any">
            <property name="template">
              /widgets/open_poll_widget_template.xhtml
            </property>
          </properties>
          <controls mode="any">
            <control name="handleLabels">true</control>
            <control name="requireSurroundingForm">true</control>
          </controls>
        </widget>
  • <widget name="summary_poll_result" type="template">
          <labels>
            <label mode="any"/>
          </labels>
          <translated>false</translated>
          <properties widgetMode="any">
            <property name="template">
              /widgets/poll_result_widget_template.xhtml
            </property>
          </properties>
          <widgetModes>
            <mode value="view">#{pollActions.displayResults(currentDocument) ? 'view' : 'hidden'}</mode>
          </widgetModes>
        </widget>
  • <widget name="summary_back_to_polls_listing" type="template">
          <labels>
            <label mode="any"/>
          </labels>
          <translated>false</translated>
          <properties widgetMode="any">
            <property name="template">
              /widgets/back_to_polls_listing_widget_template.xhtml
            </property>
          </properties>
          <controls mode="any">
            <control name="requireSurroundingForm">true</control>
          </controls>
        </widget>

XML Source

<extension point="widgets" target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager">

    <widget name="poll_question" type="text">
      <labels>
        <label mode="any">label.poll.question</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>dc:title</field>
      </fields>
      <properties widgetMode="edit">
        <property name="styleClass">dataInputText</property>
        <property name="required">true</property>
      </properties>
    </widget>

    <widget name="poll_answers" type="list">
      <labels>
        <label mode="any">label.poll.answers</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>poll:answers</field>
      </fields>
      <properties widgetMode="edit">
        <property name="required">true</property>
      </properties>
      <subWidgets>
        <widget name="listItem" type="text">
          <fields>
            <field/>
          </fields>
          <labels>
            <label mode="any"/>
          </labels>
          <properties widgetMode="edit">
            <property name="required">true</property>
          </properties>
        </widget>
      </subWidgets>
    </widget>

    <widget name="start_date" type="datetime">
      <labels>
        <label mode="any">label.poll.startDate</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>poll:start_date</field>
      </fields>
      <properties widgetMode="any">
        <property name="pattern">#{nxu:basicDateFormater()}</property>
      </properties>
      <properties widgetMode="edit">
        <property name="format">#{nxu:basicDateFormater()}</property>
      </properties>
    </widget>

    <widget name="end_date" type="datetime">
      <labels>
        <label mode="any">label.poll.endDate</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>dc:expired</field>
      </fields>
      <properties widgetMode="any">
        <property name="pattern">#{nxu:basicDateFormater()}</property>
      </properties>
      <properties widgetMode="edit">
        <property name="format">#{nxu:basicDateFormater()}</property>
      </properties>
    </widget>

    <widget name="summary_open_poll" type="template">
      <labels>
        <label mode="any">label.summary.poll.status</label>
      </labels>
      <translated>true</translated>
      <properties widgetMode="any">
        <property name="template">
          /widgets/open_poll_widget_template.xhtml
        </property>
      </properties>
      <controls mode="any">
        <control name="handleLabels">true</control>
        <control name="requireSurroundingForm">true</control>
      </controls>
    </widget>

    <widget name="summary_poll_result" type="template">
      <labels>
        <label mode="any"/>
      </labels>
      <translated>false</translated>
      <properties widgetMode="any">
        <property name="template">
          /widgets/poll_result_widget_template.xhtml
        </property>
      </properties>
      <widgetModes>
        <mode value="view">#{pollActions.displayResults(currentDocument) ? 'view' : 'hidden'}</mode>
      </widgetModes>
    </widget>

    <widget name="summary_back_to_polls_listing" type="template">
      <labels>
        <label mode="any"/>
      </labels>
      <translated>false</translated>
      <properties widgetMode="any">
        <property name="template">
          /widgets/back_to_polls_listing_widget_template.xhtml
        </property>
      </properties>
      <controls mode="any">
        <control name="requireSurroundingForm">true</control>
      </controls>
    </widget>

  </extension>